V2EX  ›  英汉词典

Regular Grammar

定义 Definition

regular grammar(正则文法)是形式语言与自动机理论中的一种文法类型,用来生成正则语言。它的产生式(规则)通常受限于较简单的形式,例如右线性左线性规则,因此与有限自动机(finite automaton)在表达能力上等价。(在不同教材中,具体允许的产生式写法会有小差异,但核心结论一致。)

发音 Pronunciation (IPA)

/ˈrɛɡjələr ˈɡræmər/

例句 Examples

A regular grammar can describe simple patterns like repeated letters.
正则文法可以描述一些简单模式,比如字母的重复。

In compiler design, token patterns are often specified by regular expressions, which correspond to regular languages that can be generated by a regular grammar.
在编译器设计中,词法单元(token)的模式常用正则表达式来描述;这些正则表达式对应的正则语言也可以由正则文法生成。

词源 Etymology

regular 来自拉丁语 regularis,与 “rule(规则)” 同源,含“受规则约束、规律性的”之意;grammar 源自希腊语 grammatikē,原指“文字/语法的学问”。合在一起,regular grammar 强调这种文法的规则形式受到严格限制,从而只能生成“正则(regular)”这一类较简单、可由有限自动机识别的语言。

相关词 Related Words

文学与著作 Literary Works

  • Introduction to Automata Theory, Languages, and Computation(Hopcroft, Motwani, Ullman)——在正则语言与正则文法、有限自动机等价性章节中系统出现
  • Introduction to the Theory of Computation(Michael Sipser)——讲解正则语言、有限自动机与文法的对应关系时出现
  • Noam Chomsky 的相关论文与后续教材对“乔姆斯基层级(Chomsky hierarchy)”的阐述中,常以正则文法作为最弱的一类文法对照其他类型
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1022 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 18ms · UTC 16:53 · PVG 00:53 · LAX 08:53 · JFK 11:53
♥ Do have faith in what you're doing.